﻿@namespace Masa.Blazor
@inherits MasaComponentBase

<CascadingValue Value="Theme" Name="MasaBlazorCascadingTheme">
    <CascadingValue Value="this" TValue="IDefaultsProvider" IsFixed="true">
        <div class="@GetClass()"
             style="@GetStyle()"
             id="@Id"
             @ref="@Ref"
             data-app>
            <div class="@_block.Element("wrap")">
                @ChildContent
            </div>

            @foreach (var item in PopupService.GetItems())
            {
                <CascadingValue @key="item" Value="item" IsFixed="true">
                    <DynamicComponent Type="item.ComponentType" Parameters="item.Parameters"></DynamicComponent>
                </CascadingValue>
            }
            <div data-permanent class="m-application__permanent"></div>
        </div>
    </CascadingValue>
</CascadingValue>